package com.dongjiantong.quarantine.mapper;

import com.dongjiantong.mybatis.MyMapper;
import com.dongjiantong.quarantine.model.DjtBreedReports;

import java.util.List;
import java.util.Map;

public interface DjtBreedReportsMapper extends MyMapper<DjtBreedReports> {


    /**
     * 养殖端的分页列表
     * @param map  参数
     * @return List<DjtBreedReports>
     */
    List<DjtBreedReports> selectListForFarm(Map<String, Object> map);

    /**
     * 政府端的分页列表
     * @param map 参数
     * @return List<DjtBreedReports>
     */
    List<DjtBreedReports> selectListForGOV(Map map);

    /**
     * 获取当前最大单据号
     * @param prefix 前缀
     * @return String number
     */
    String findCurrentMaxNumber(String prefix);

    /**
     * 获取当前单据状态
     * @param id 单据主键
     * @return Integer status
     */
    Integer findStatusById(Long id);

    /**
     * 更改单据的delete——flag
     * @param id 单据id
     */
    void updateDeleteFlag(Long id);

    List<DjtBreedReports> selectListForWeb(Map<String, Object> map);

    List<Map<String,Object>> applyTop10ByArea(Map<String, Object> map);

    List<Map<String,Object>> applyTop10ByApplyStation(Map<String, Object> map);

    List<Map<String,Object>> findSumByIsToLocal(Map<String, Object> map);

    Map<String,Object> findSumForWebDataAnalysis(Map<String, Object> map);

    List<Map<String,Object>> sumGroupByReceive(Map<String, Object> map);

    List<Map<String,Object>> sumGroupByDeliver(Map<String, Object> map);

    List<Map<String,Object>> findSumByIsToLocalAndMonth(Map<String, Object> map);

    Map<String,Object> findSumForWebDataAnalysisAndMonth(Map<String, Object> map);

    Map<String,Object> selectSum(Map<String , Object> map);
}